﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib  prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
	<div class="data_list">
		  	<div class="data_list_title">
			<img  src="${pageContext.request.contextPath}/static/images/list_icon.png"/>
			最新博客
			</div>
		  	<div class="datas">
	  			<ul>
	  			<c:if test="${page==1}">
		  			<c:forEach items="${topBlog }" var="blog">
				  	  <li style="margin-bottom: 30px">
					  	<%--<span class="date"><a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html"><fmt:formatDate value="${blog.releaseDate}" type="date"  pattern="yyyy年MM月dd日"/></a></span>--%>
					  	<span class="title"><span class="layui-btn layui-btn-normal layui-btn-xs">置顶  </span>  <a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html">${blog.title}</a></span>
					  	<span class="summary">摘要：${blog.summary}...</span>
					  	<span class="img">
						  	<c:forEach items="${blog.imageList}" var="image">
						  		<a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html">${image}</a>
							  		&nbsp;&nbsp;
							  </c:forEach>		
					  	</span>
					  	<span class="info">类别：<font class="blue-color"><a href="${pageContext.request.contextPath}/index.html?typeId=${blog.blogType.id}">${blog.blogType.typeName}</a>&nbsp;&nbsp;&nbsp;&nbsp;</font>  发表于<fmt:formatDate value="${blog.releaseDate}" type="date"  pattern="yyyy-MM-dd"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  阅读(${blog.clickHit}) <!--评论(${blog.replyHit})-->
						</span>
					  </li>
				  	 <hr style="height:5px;border:none;border-top:1px dashed #ffffff;padding-bottom:  5px;" />
				  	</c:forEach> 	
			  	</c:if>
	  			<c:forEach items="${blogList }" var="blog">
			  	  <li style="margin-bottom: 30px">
				  	<span class="date"><a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html"><fmt:formatDate value="${blog.releaseDate}" type="date"  pattern="yyyy年MM月dd日"/></a></span>
				  	<span class="title"><a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html">${blog.title}</a></span>
				  	<span class="summary">摘要：${blog.summary}...</span>
				  	<span class="img">
					  	<c:forEach items="${blog.imageList}" var="image">
					  		<a href="${pageContext.request.contextPath}/blog/articles/${blog.id}.html">${image}</a>
						  		&nbsp;&nbsp;
						  </c:forEach>
				  	</span>
				  	<span class="info">类别：<font class="blue-color"><a href="${pageContext.request.contextPath}/index.html?typeId=${blog.blogType.id}">${blog.blogType.typeName}</a>&nbsp;&nbsp;&nbsp;&nbsp;</font>  发表于<fmt:formatDate value="${blog.releaseDate}" type="date"  pattern="yyyy-MM-dd"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  阅读(${blog.clickHit}) <!--评论(${blog.replyHit})-->
					</span>
				  </li>
			  	 <hr style="height:5px;border:none;border-top:1px dashed #ffffff;padding-bottom:  5px;" />
			  	</c:forEach> 	
			  </ul>
		  		
		  	</div>
		</div>
		<!-- 分页 -->
		<div style="text-align:center">
			<nav>
			  <ul class="pagination pagination-sm">
			    	${pageCode}	
			  </ul>
			</nav>
		 </div>
		  	